package structure.filter;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author yeyangtao
 * @date 2020/6/23 14:44
 */
public class CriteriaFemale implements Criteria{
    @Override
    public List<Person> meetCriteria(List<Person> list) {
        return list.stream()
                .filter(l-> "FEMALE".equalsIgnoreCase(l.getGender())).collect(Collectors.toList());
    }
}
